Skip to content

fix(github): find a pasted issue or PR URL in the From GitHub picker - #372

Open
gnutix wants to merge 1 commit into
johannesjo:mainfrom
gnutix:fix/github-picker-pasted-url
Open

gnutix wants to merge 1 commit into
johannesjo:mainfrom
gnutix:fix/github-picker-pasted-url

Conversation

@gnutix

@gnutix gnutix commented Nov 13, 2026

Copy link
Copy Markdown

Problem

In the new-task panel, From GitHub… searches with gh issue list / gh pr list --search. Pasting a full issue or PR link (https://github.com/owner/repo/pull/12) found nothing, because GitHub's search does not match an item's URL. Typing the bare number 12 worked.

Fix

listGitHubWorkItems (electron/github/work-items.ts) now recognises a search that is an issue or PR URL: it searches by the URL's number, then keeps only the item whose URL names the same host, repository and number. So:

The path's kind (issues / pull) is not compared, since GitHub serves a PR under /issues/N too.

Tests

  • New unit tests in electron/github/work-items.test.ts for the URL parsing, the number search, and the filter.
  • npm run check and npm test pass.

No screenshots: nothing in the UI changes except that the picker now lists the item, and the showcase harness has no GitHub repository to search.

🤖 Generated with Claude Code (Opus 5.5)

GitHub's search does not match an item's URL, so pasting a link into the
picker found nothing while its bare number worked. Search by the URL's
number instead, and keep only the item the URL names, so text matches of
that number and URLs of other repositories list nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant